import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.border.EmptyBorder;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableModel;
import javax.swing.JTable;

import org.eclipse.swt.widgets.TableColumn;


public class DataTableFrame extends JFrame {

	private JPanel contentPane;
	private JTable table;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					DataTableFrame frame = new DataTableFrame();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create a new frame to hold a data table
	 * @author AJ
	 * @return none
	 */
	public DataTableFrame() {
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 450, 300);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		contentPane.setLayout(new BorderLayout(0, 0));
		setContentPane(contentPane);
		
		
		
		DefaultTableModel model = new DefaultTableModel();
		model.addColumn("TestCol1");
		model.addColumn("TestColumn2");
		//model.setNumRows(3);
		table = new JTable(model);
		//TableModel tmodel = new DAPTableModel();
		
		model.addRow(new String[] {"testdata1", "testdata2"});
		model.addRow(new String[] {"testdata4", "testdata4"});
		
		
		contentPane.add(table, BorderLayout.NORTH);
		//table.setVisible(true);
		
		JScrollPane pane = new JScrollPane(table);
		contentPane.add(pane);
		
	}

}
